/**
 * 
 */
package neptune.web.client.view.components.dialogs;

import com.google.gwt.user.client.ui.Button;
import com.google.gwt.user.client.ui.ClickListener;
import com.google.gwt.user.client.ui.DialogBox;
import com.google.gwt.user.client.ui.Frame;
import com.google.gwt.user.client.ui.VerticalPanel;
import com.google.gwt.user.client.ui.Widget;

/**
 * @author Roberto Bifulco [RobertoBifulco.it] [info@robertoBifulco.it]
 *
 */
public class HelpDialog extends DialogBox {

	public HelpDialog(String helpURL){
		
		setText("Help");
		
		VerticalPanel vPanel = new VerticalPanel();
		vPanel.setHeight("500px");
		vPanel.setWidth("500px");
		
		
		Frame frame = new Frame(helpURL);
		frame.setHeight("480px");
		frame.setWidth("500px");
		frame.setStylePrimaryName("HelpDialog-frame");
		vPanel.add(frame);
		
		Button close = new Button("Close");
		close.addClickListener(new ClickListener() {
			public void onClick(Widget sender) {
				HelpDialog.this.hide();
			}
		});
		close.setStylePrimaryName("HelpDialog-closeButton");
		close.setWidth("100%");
		close.setHeight("20px");
		vPanel.add(close);
		vPanel.setCellWidth(close, "100%");
		
		setWidget(vPanel);
		setStylePrimaryName("HelpDialog");
	}
	
}
